.img{
  width: 100px;
  height: 100px;
  overflow: hidden;
  display: inline-block;
}
.img>img{
  width: 100%;
  display: inline-block;
  vertical-align: middle;
}